﻿using Caliburn.Micro;
using SD.Infrastructure.WPF.Caliburn.Base;
using SD.IOC.Core.Mediators;

namespace SlamDunk.MES.Client.ViewModels.Supervision
{
    /// <summary>
    /// 设备监控ViewModel
    /// </summary>
    public class IndexViewModel : ScreenBase
    {
        #region # 字段及构造器
        /// <summary>
        /// 窗口管理器
        /// </summary>
        private readonly IWindowManager _windowManager;

        /// <summary>
        /// 依赖注入构造器
        /// </summary>
        public IndexViewModel(IWindowManager windowManager)
        {
            this._windowManager = windowManager;

        }

        #endregion

        #region 查看 —— async void Look()
        /// <summary>
        /// 查看
        /// </summary>
        /// <param name=""></param>
        public async void Look()
        {
            LookViewModel viewModel = ResolveMediator.Resolve<LookViewModel>();
            viewModel.Load();
            bool? result = await this._windowManager.ShowDialogAsync(viewModel);
        }
        #endregion
    }
}
